<if condition="$type eq 1 "><span onclick="sendMsg()" class="addMsg">发送新消息 </span></if>

<volist name="msgList" id="vo">
<div class="msgBox">
	<div class="from">{$vo.f_name}</div>
	<div class="content">
		<div >{$vo.content}</div>
		<div class="time">{$vo.create_time}</div>
	</div>
	<div style="clear:both;"></div>
</div>
</volist>

<div class="pageList" id="pageList">{$pageList}</div>
<script>
function sendMsg(){
	$.get(
		"__APP__/Content/sendMsg",
		function(data){
			$("#messageList").html(data);
		}
	);
}

var type = {$type};
var curPage = {$curPage};
$("#pageList span").each(function(){
	$(this).bind('click',function(){
		var page = $(this).attr('page');
		if (page && page != curPage) {
			$.get(
				"__APP__/Content/messageList",
				{type:type,page:page},
				function(data){
					$("#messageList").html(data);
				}
			);			
		}
	});
});
</script>